package com.suixinsanren.design.command.demo03;

public class FanOffCommand implements Command {

    private final Fan fan;

    public FanOffCommand(Fan light) {
        this.fan = light;
    }

    @Override
    public void execute() {
        fan.off();
    }

    @Override
    public void undo() {
        fan.on();
    }
}
